import { fileURLToPath, URL } from 'node:url'

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import basicSsl from '@vitejs/plugin-basic-ssl'
import vueJsx from '@vitejs/plugin-vue-jsx'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    vueJsx(),
    basicSsl()
  ],

  base:"./", //设置项目的根目录
  build: {
    outDir: 'docs' // 打包文件的输出目录
  },
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  },
  server: {
    https: true,

    proxy: {
      "/italent": {
        target: "https://www.italent.cn/",
        // target: "http://localhost:8081/",
        // target:"http://192.168.3.134:8081/",
        // target: "http://erp.technologycloud.net/",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/italent/, ""),
      },


    },
  },
})




